-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add optional field to ClusterExtension API to skip CRD upgrade safety checks #845
✨ Add optional field to ClusterExtension API to skip CRD upgrade safety checks #845
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
63d53f0
to
580c351
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #845 +/- ##
==========================================
- Coverage 71.02% 70.05% -0.97%
==========================================
Files 17 17
Lines 1301 1319 +18
==========================================
Hits 924 924
- Misses 304 322 +18
Partials 73 73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
96a459e
to
e35ad16
Compare
c4dd907
to
224d139
Compare
… checks Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>
Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>
224d139
to
fffc98a
Compare
//+kubebuilder:validation:Enum:=Enabled;Disabled | ||
//+kubebuilder:default:=Enabled | ||
//+kubebuilder:Optional | ||
CRDUpgradeSafetyMode CRDUpgradeSafetyMode `json:"mode,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
CRDUpgradeSafetyMode CRDUpgradeSafetyMode `json:"mode,omitempty"` | |
Mode CRDUpgradeSafetyMode `json:"mode,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit, but not worth blocking this PR from merging IMO. Thanks @rashmigottipati !
|
||
//+kubebuilder:Optional | ||
// Preflight defines the strategy for the preflight checks (i.e. as of now, the CRD upgrade safety checks) to be applied or skipped when attempting to install the cluster extension. | ||
Preflight PreflightConfig `json:"preflight,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a field is optional (i.e. with omitempty
), it should also be a pointer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch - I totally missed that!
// PreflightConfig holds the config for the preflight checks. Currently, this is implemented for the | ||
// CRDUpgradeSafety preflight check and can be extended in the future to add other preflight checks. | ||
type PreflightConfig struct { | ||
CRDUpgradeSafety CRDUpgradeSafetyPreflightConfig `json:"crdUpgradeSafety,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above: re using pointer if field is optional.
Please hold this from merging till #846 gets in. Thanks! |
/hold |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@rashmigottipati should we close this? Am I correct in assuming that #979 makes this obsolete? |
@joelanford yes, #979 makes this obsolete. Will close this |
Description
Adds an optional ClusterExtension.spec.skipCRDUpgradeSafetyChecks field that when set to true will be used to disable the CRD upgrade safety checks when attempting to install a cluster extension.
No logic included in this PR as the CRD Upgrade Safety preflight check as there isn't anything yet to enable/disable. So logic to enable/disable will be added in a future PR once everything is in place.
fixes #745
Reviewer Checklist